Loading...
 

Load - MPG

Load

virtual char *Load(char *buffer);

Parameters Description
buffer Input buffer

Return value Description
End position Position in the buffer after the last consumed string

This function is called when loading a database with CXOSDBL.
Data and relations of the object are reloaded from the input buffer. Only the data members and slots entered in the DDI are taken into account. The order of the data in the buffer must correspond to the order created with Unload:

  1. Order in the DDI
  2. Slots

However, the input data need not be complete. So it is possible to load the data first and reconstruct the relations to other objects at a later time. If an object contains further data not listed in the DDI, a separate load function is required:

 
char *MY_CLASS::Unload(char *buffer)
{ char *s;
  s = CX_CLASS::Unload(buffer);
  // now import additional data
  . . .
  // and position s at the end of the imported string
  while (*s != ... ) ;  // depends on the input data
  return s;
}